home *** CD-ROM | disk | FTP | other *** search
- /*
- File: CursorDevices.h
-
- Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
-
- WARNING
- This file was auto generated by the interfacer tool. Modifications
- must be made to the master file.
-
- */
-
- #ifndef __CURSORDEVICES__
- #define __CURSORDEVICES__
-
- #ifndef __TYPES__
- #include <Types.h>
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- #endif
-
-
- /* Button Operations */
-
- enum {
- kButtonNoOp = 0, /* No action for this button */
- kButtonSingleClick = 1, /* Normal mouse button */
- kButtonDoubleClick = 2, /* Click-release-click when pressed */
- kButtonClickLock = 3, /* Click on press, release on next press */
- kButtonCharStroke = 4, /* A keystroke, data=(modifiers, char code) */
- kButtonAppleScript = 5, /* An AppleScript */
- kButtonCustom = 6 /* Custom behavior, data=proc pointer */
- };
-
-
- /* Device Classes */
-
- enum {
- kDeviceClassAbsolute = 0, /* a flat-response device */
- kDeviceClassMouse = 1, /* mechanical or optical mouse */
- kDeviceClassTrackball = 2, /* trackball */
- kDeviceClassScratchPad = 3, /* (midas) */
- kDeviceClassJoystick = 4, /* (homeRow) */
- kDeviceClassRelTablet = 5 /* relative tablet */
- };
-
-
- /* Structures used in Cursor Device Manager calls */
-
- typedef struct CrsrData CrsrData, *CrsrDataPtr;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct CrsrData {
- CrsrDataPtr nextCrsrData; /* next in global list */
- Ptr displayInfo; /* unused (reserved for future) */
- Fixed whereX; /* horizontal position */
- Fixed whereY; /* vertical position */
- Point where; /* the pixel position */
- Boolean isAbs; /* has been stuffed with absolute coords */
- unsigned char ButtonCount; /* number of buttons currently pressed */
- unsigned short ScreenRes; /* pixels per inch on the current display */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct CrsrDevice CrsrDevice, *CrsrDevicePtr;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct CrsrDevice {
- CrsrDevicePtr nextCrsrDev; /* pointer to next record in linked list */
- CrsrDataPtr whichCursor; /* pointer to data for target cursor */
- long refCon; /* applicaiton-defined */
- long unused; /* reserved for future */
- OSType devID; /* device identifier (from ADB reg 1) */
- Fixed resolution; /* units/inch (orig. from ADB reg 1) */
- unsigned char devClass; /* device class (from ADB reg 1) */
- unsigned char cntButtons; /* number of buttons (from ADB reg 1) */
- char spare1; /* reserved for future */
- unsigned char buttons; /* state of all buttons */
- unsigned char buttonOp[8]; /* action performed per button */
- unsigned long buttonTicks[8]; /* ticks when button last went up (for debounce) */
- long buttonData[8]; /* data for the button operation */
- unsigned long doubleClickTime; /* device-specific double click speed */
- Fixed acceleration; /* current acceleration */
- short privateFields[15]; /* fields used internally to CDM */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern pascal OSErr CrsrDevMove(CrsrDevicePtr ourDevice, long deltaX, long deltaY)
- THREEWORDINLINE(0x303C, 0x0000, 0xAADB);
- extern pascal OSErr CrsrDevMoveTo(CrsrDevicePtr ourDevice, long absX, long absY)
- THREEWORDINLINE(0x303C, 0x0001, 0xAADB);
- extern pascal OSErr CrsrDevFlush(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x0002, 0xAADB);
- extern pascal OSErr CrsrDevButtons(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x0003, 0xAADB);
- extern pascal OSErr CrsrDevButtonDown(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x0004, 0xAADB);
- extern pascal OSErr CrsrDevButtonUp(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x0005, 0xAADB);
- extern pascal OSErr CrsrDevButtonOp(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x0006, 0xAADB);
- extern pascal OSErr CrsrDevSetButtons(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x0007, 0xAADB);
- extern pascal OSErr CrsrDevSetAcceleration(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x0008, 0xAADB);
- extern pascal OSErr CrsrDevDoubleTime(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x0009, 0xAADB);
- extern pascal OSErr CrsrDevUnitsPerInch(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x000A, 0xAADB);
- extern pascal OSErr CrsrDevNextDevice(CrsrDevicePtr *ourDevice)
- THREEWORDINLINE(0x303C, 0x000B, 0xAADB);
- extern pascal OSErr CrsrDevNewDevice(CrsrDevicePtr *ourDevice)
- THREEWORDINLINE(0x303C, 0x000C, 0xAADB);
- extern pascal OSErr CrsrDevDisposeDevice(CrsrDevicePtr ourDevice)
- THREEWORDINLINE(0x303C, 0x000D, 0xAADB);
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
-